import pymysql
db = pymysql.connect("10.3.110.175", "root", "jinshanjf#168", "python")

cursor = db.cursor()
cursor.execute("select * from loan_info")

results = cursor.fetchall()
for row in results:
    id = row[0]
    name = row[1]
    amount = row[2]
    print "id=%s,name=%s,amount=%s" % (id, name, amount)

db.close()